package com.ruoyi.order.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 常规订单对象 t_technician_item_order
 *
 * @author ruoyi
 * @date 2025-04-09
 */
@Data
public class TechnicianItemOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 订单ID
     */
    private Long id;

    /**
     * 父订单号
     */
    private String partnerOrderNo;

    /**
     * 订单编号
     */
    @Excel(name = "订单编号")
    private String orderNo;

    /**
     * 微信侧订单号
     */
    private String transactionId;

    /**
     * 用户
     */
    @Excel(name = "用户")
    private Long userId;

    /**
     * 技师
     */
    @Excel(name = "技师")
    private Long tid;

    private String tName;
    private String tTel;
    private String tAvatar;

    /**
     * 项目
     */
    private Long itemId;

    /**
     * 项目规格
     */
    private Long itemSpecsId;

    /**
     * 项目名
     */
    @Excel(name = "项目名")
    private String itemName;

    /**
     * 项目图
     */
    @Excel(name = "项目图")
    private String itemPicture;

    /**
     * 项目时长（分钟）
     */
    @Excel(name = "项目时长", readConverterExp = "分=钟")
    private Integer itemTime;

    /**
     * 地址ID
     */
    private Long addressId;

    /**
     * 联系人
     */
    @Excel(name = "联系人")
    private String addressUserName;

    /**
     * 联系电话
     */
    @Excel(name = "联系电话")
    private String addressTel;

    /**
     * 服务地点
     */
    @Excel(name = "服务地点")
    private String addressDetail;

    /**
     * 服务时间
     */
    @Excel(name = "服务时间")
    private String serviceTime;

    /**
     * 订单备注
     */
    @Excel(name = "订单备注")
    private String orderRemark;

    /**
     * 支付金额
     */
    @Excel(name = "支付金额")
    private BigDecimal needPayPrice;

    /**
     * 订单总金额
     */
    @Excel(name = "订单总金额")
    private BigDecimal orderTotalPrice;

    /**
     * 出行方式
     */
    @Excel(name = "出行方式")
    private String modeTravel;

    /**
     * 项目价格
     */
    @Excel(name = "项目价格")
    private BigDecimal orderItemPrice;

    /**
     * 出行车费
     */
    @Excel(name = "出行车费")
    private BigDecimal orderFarePrice;

    /**
     * 总优惠金额
     */
    @Excel(name = "总优惠金额")
    private BigDecimal discountPrice;

    /**
     * 是否使用优惠券
     */
    @Excel(name = "是否使用优惠券")
    private Integer isUserCoupon;

    /**
     * 优惠券名
     */
    @Excel(name = "优惠券名")
    private Long userCouponId;

    /**
     * 支付方式
     */
    @Excel(name = "支付方式")
    private String payType;

    /**
     * 下单时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "下单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date placeOrderTime;

    /**
     * 支付时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    /**
     * 下单数量
     */
    @Excel(name = "下单数量")
    private Integer orderNum;

    /**
     * 订单类型
     */
    @Excel(name = "订单类型")
    private Integer orderType;

    /**
     * 订单状态
     */
    @Excel(name = "订单状态")
    private Integer orderStatus;

    /**
     * 是否开通会员
     */
    @Excel(name = "是否开通会员")
    private Integer isOpenMembership;

    /**
     * 会员名
     */
    @Excel(name = "会员名")
    private Long openMemberId;

    /**
     * 会员开通金额
     */
    @Excel(name = "会员开通金额")
    private BigDecimal openMemberPrice;

    /**
     * 用户和技师之间的距离（单位：km）
     */
    @Excel(name = "用户和技师之间的距离", readConverterExp = "单=位：km")
    private BigDecimal distance;

    /**
     * 待接单等待时间
     */
    @Excel(name = "待接单等待时间")
    private String takeOrderWaitTime;

    /**
     * 待开始等待时间
     */
    private String startServiceWaitTime;

    /**
     * 服务总时长
     */
    private String serviceTotalTime;

    /**
     * 技师出发位置
     */
    @Excel(name = "技师出发位置")
    private String leaveAddress;

    /**
     * 接单时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "接单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date takeOrderTime;

    /**
     * 出发时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "出发时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date proceedTime;

    /**
     * 到达位置
     */
    @Excel(name = "到达位置")
    private String arriveAddress;

    /**
     * 到达照片
     */
    @Excel(name = "到达照片")
    private String arrivePicture;

    /**
     * 到达备注
     */
    @Excel(name = "到达备注")
    private String arriveRemark;

    /**
     * 到达时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "到达时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date arriveTime;

    /**
     * 服务开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "服务开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date startServiceTime;

    /**
     * 服务结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "服务结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date stopServiceTime;

    /**
     * 实际服务时长
     */
    @Excel(name = "实际服务时长")
    private String realServiceTime;

    /**
     * 订单取消时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "订单取消时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date cancelTime;

    /**
     * 订单取消原因
     */
    @Excel(name = "订单取消原因")
    private String cancelReason;

    /**
     * 订单取消描述
     */
    @Excel(name = "订单取消描述")
    private String cancelDescribe;

    /**
     * 预计收入
     */
    @Excel(name = "预计收入")
    private BigDecimal expectIncome;

    /**
     * 订单是否异常
     */
    @Excel(name = "订单是否异常")
    private Integer isException;

    @Excel(name = "录音文件")
    private String recordUrl;

    /**
     * 逻辑删除（0=未删除，1=已删除）
     */
    private Integer isDelete;


    private String userName;

    private String userTel;

    //下单次数
    private Integer placeOrderCount;

    private List<String> userLabelName;

    //技师项目分成
    private BigDecimal technicianItemIncome;
    //技师车费收入
    private BigDecimal technicianCarIncome;
    //经纪人分佣
    private BigDecimal brokerIncome;
    private String brokerName;
    //业务员分佣
    private BigDecimal salesmanIncome;
    private String salesmanName;
    //渠道商分佣
    private BigDecimal channelIncome;
    private String channelName;
    //优惠券优惠金额
    private BigDecimal couponPrice;
    //待付款倒计时
    private Long countdown;
    //服务结束倒计时
    private Long serviceOverCountDown;
    //发生退款时的订单状态
    private Integer orderOldStatus;

}
